package com.lqk.spring.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author lqk
 * @date 2021/12/1 18:15
 */
public class ProtoType {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
        //获取monster[通过id获取monster]
        Object bean = applicationContext.getBean("id01");
        System.out.println("bean" + bean);

        Object bean2 = applicationContext.getBean("id01");
        System.out.println("bean2" + bean2);

        System.out.println(bean == bean2);
    }
}
